<!DOCTYPE html>
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
	<title>贪婪与懒惰</title>
	<style type="text/css">
	* {
		padding: 0;
		margin: 0;
	}
    </style>
</head>
<body>
	<div class="container">
		<h1>贪婪与懒惰</h1>
	</div>
	<script src="https://cdn.staticfile.org/jquery/3.2.0/jquery.js"></script>
	<script type="text/javascript">

	// 最先开始的匹配拥有最高的优先权——The match that begins earliest wins。
	var reg = /a.*?b/g
	var str = 'aabaaa333ab'
	console.log(str.match(reg))

	
	</script>
</body>
</html>